\ProvidesPackage{fig_gzjn}

\RequirePackage{tikz}

\RequirePackage{xcolor}
\definecolor{bg_gray}{RGB}{230, 230, 230}
\definecolor{c_blank}{RGB}{147, 254, 123}
\definecolor{c_comp}{RGB}{247, 130, 255}

\newcommand{\drawBoardGZJN}{

    % The surrounding box
    \draw[thick, rounded corners=10pt, fill=bg_gray] (-0.4, -0.4) rectangle (4.4, 6.4);

    % The inner grids
    \draw (0, 0) -- (2, 0) -- (2, 1) -- (4, 1) -- (4, 6) -- (0, 6) -- (0, 0);
    \draw (1, 0) -- (1, 6);
    \draw (2, 0) -- (2, 6);
    \draw (3, 1) -- (3, 6);
    \draw (0, 1) -- (4, 1);
    \draw (0, 2) -- (4, 2);
    \draw (0, 3) -- (4, 3);
    \draw (0, 4) -- (4, 4);
    \draw (0, 5) -- (4, 5);
    \draw (0, 6) -- (4, 6);
}

\newcommand{\drawLabelGZJN}{

    % The labels
    \node at (0.5, 5.5) {丑};
    \node at (1.5, 5.5) {子};
    \node at (2.5, 5.5) {甲};
    \node at (3.5, 5.5) {乙};
    \node at (0.5, 4.5) {寅};
    \node at (1.5, 4.5) {卯};
    \node at (2.5, 4.5) {丁};
    \node at (3.5, 4.5) {丙};
    \node at (0.5, 3.5) {巳};
    \node at (1.5, 3.5) {辰};
    \node at (2.5, 3.5) {戊};
    \node at (3.5, 3.5) {己};
    \node at (0.5, 2.5) {午};
    \node at (1.5, 2.5) {未};
    \node at (2.5, 2.5) {辛};
    \node at (3.5, 2.5) {庚};
    \node at (0.5, 1.5) {酉};
    \node at (1.5, 1.5) {申};
    \node at (2.5, 1.5) {壬};
    \node at (3.5, 1.5) {癸};
    \node at (0.5, 0.5) {戌};
    \node at (1.5, 0.5) {亥};
}

\newcommand{\drawColorGZJN}{

    \draw[fill=white] (0, 0) rectangle (2, 1);
    \draw[fill=white] (0, 1) rectangle (4, 6);

    \draw[fill=lime] (0, 0) rectangle (1, 1);
    \draw[fill=lime] (1, 1) rectangle (2, 2);
    \draw[fill=lime] (0, 2) rectangle (1, 3);
    \draw[fill=lime] (1, 3) rectangle (2, 4);
    \draw[fill=lime] (0, 4) rectangle (1, 5);
    \draw[fill=lime] (1, 5) rectangle (2, 6);
    \draw[fill=lime] (3, 1) rectangle (4, 2);
    \draw[fill=lime] (2, 2) rectangle (3, 3);
    \draw[fill=lime] (3, 3) rectangle (4, 4);
    \draw[fill=lime] (2, 4) rectangle (3, 5);
    \draw[fill=lime] (3, 5) rectangle (4, 6);
}

\newcommand{\drawCycleGZJN}{

    \node[circle, draw, minimum size=0.3cm, inner sep=0pt           ] (丑) at (0.5,5.5) {丑};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt, fill=lime] (子) at (1.5,5.5) {子};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt           ] (甲) at (2.5,5.5) {甲};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt, fill=lime] (乙) at (3.5,5.5) {乙};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt, fill=lime] (寅) at (0.5,4.5) {寅};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt           ] (卯) at (1.5,4.5) {卯};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt, fill=lime] (丁) at (2.5,4.5) {丁};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt           ] (丙) at (3.5,4.5) {丙};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt           ] (巳) at (0.5,3.5) {巳};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt, fill=lime] (辰) at (1.5,3.5) {辰};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt           ] (戊) at (2.5,3.5) {戊};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt, fill=lime] (己) at (3.5,3.5) {己};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt, fill=lime] (午) at (0.5,2.5) {午};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt           ] (未) at (1.5,2.5) {未};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt, fill=lime] (辛) at (2.5,2.5) {辛};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt           ] (庚) at (3.5,2.5) {庚};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt           ] (酉) at (0.5,1.5) {酉};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt, fill=lime] (申) at (1.5,1.5) {申};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt           ] (壬) at (2.5,1.5) {壬};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt, fill=lime] (癸) at (3.5,1.5) {癸};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt, fill=lime] (戌) at (0.5,0.5) {戌};
    \node[circle, draw, minimum size=0.3cm, inner sep=0pt           ] (亥) at (1.5,0.5) {亥};

    \draw[ultra thick] (丑) -- (寅);
    \draw[ultra thick] (乙) -- (丙);
    \draw[ultra thick] (寅) -- (巳);
    \draw[ultra thick] (卯) -- (辰);
    \draw[ultra thick] (丁) -- (戊);
    \draw[ultra thick] (丙) -- (己);
    \draw[ultra thick] (巳) -- (午);
    \draw[ultra thick] (辰) -- (未);
    \draw[ultra thick] (戊) -- (辛);
    \draw[ultra thick] (己) -- (庚);
    \draw[ultra thick] (午) -- (酉);
    \draw[ultra thick] (未) -- (申);
    \draw[ultra thick] (辛) -- (壬);
    \draw[ultra thick] (庚) -- (癸);
    \draw[ultra thick] (酉) -- (戌);
    \draw[ultra thick] (申) -- (亥);

    \draw[ultra thick] (丑) -- (子);
    \draw[ultra thick] (子) -- (甲);
    \draw[ultra thick] (甲) -- (乙);
    \draw[ultra thick] (卯) -- (丁);
    \draw[ultra thick] (壬) -- (癸);
    \draw[ultra thick] (戌) -- (亥);
}